package com.ruoyi.mobile.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.mobile.domain.SysUserEntity;
import com.ruoyi.mobile.utils.NftResponse;
import com.ruoyi.system.api.req.LoginReq;
import com.ruoyi.system.api.req.SysUserReq;
import com.ruoyi.system.api.resp.SysUserResp;;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

public interface AuthService extends IService<SysUserEntity> {
    public NftResponse<SysUserResp> initAppUser(LoginReq loginReq);
    public NftResponse<SysUserResp> login(LoginReq loginReq);
    public NftResponse<Boolean> logout(Integer userId);
    public NftResponse userMinRegister(SysUserReq sysUserReq);

    public NftResponse<Boolean> putUsername(@RequestParam("userId") Long userId, @RequestParam("userName") String userName);
    public NftResponse<Boolean> putSex(@RequestParam("userId") Long userId, @RequestParam("sex") String sex);
    public String putAvatar(HttpServletRequest request, MultipartFile file);
    public Boolean putOpenId(@RequestParam("appid") String appid, @RequestParam("phonenumber") String phonenumber, @RequestParam("openId") String openId, @RequestParam("inviteId") Long inviteId);
    public NftResponse<SysUserResp> getUserInfo(@RequestParam("openId") String openId);
}
